<template>
	<view>
		<image class="bg-img" src="https://img.js.design/assets/img/631d64660e0d177adba0f7d5.jpg"></image>
		<view class="content">
			<view class="box">
				<view class="change">
					<view style="width: 350rpx;">
						<u-tabs :list="list" active-color="rgba(255, 235, 59, 1)" :is-scroll="false" :current="current"
							@change="change"></u-tabs>
					</view>
					<view style="width: 400rpx; height: 70rpx;" @click="search">
						<image style="width: 100%; height: 100%;" src="../../static/icon-box/search.png"></image>
					</view>
				</view>
				<view class="box-center">
					<!-- 发现 -->
					<view v-if="current===0">
						<view class="box-center-container">
							<block>
								<view class="item">
									
								</view>
							</block>
						</view>
					</view>
					<!-- 活动 -->
					<view v-else>
						fuodong
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '发现'
				}, {
					name: '活动'
				}],
				current: 0

			};
		},
		methods: {
			change(index) {
				this.current = index.index
			},
			search(){
				console.log("搜索")
			}
		}
	}
</script>

<style lang="scss">
	.bg-img {
		position: fixed;
		width: 100%;
		height: 102%;
		top: 0;
		left: 0;
		z-index: -1;
		//opacity: 0.4; 透明度
	}

	.box {
		margin-top: 30px;
		background-color: aliceblue;
		// opacity:0.75;
		background: rgba(255, 255, 255, 0.75);
		min-height: 900px;
		width: 100%;
		border-top-left-radius: 25px; //左上角
		border-top-right-radius: 25px; //右上角

		.change {
			position: absolute;
			margin-top: 5%;
			display: flex;
			flex-direction: row;
		}
	}
	.box-center{
		position: absolute;
		margin-top: 20%;
	}
	
	.box-center-container{
		height: 1000px;
		background-color: aquamarine;
	}
	.item{
	            width: 50%;
	}
	.item iamge{
		 width: 100%;
	}
</style>
